package com.ysp;

/**
 * @author ysp
 * @date 2021/1/10 15:31
 */
public class Main {

    public static void main(String[] args) {

        Base base = new Calculator();
        base.add();
        base.sub();
        //当使用ClassAdapter接收这个时候就会暴露出Own的方法
        //Base base1 = new ClassAdapter();
        ClassAdapter base1 = new ClassAdapter();
        base1.add();
        base1.sub();
        base1.JIA();
        base1.JIAN();
        Base base2 = new ObjectAdapter(new Own());
        base2.add();
        base2.sub();
    }
}
